def process_words(file_path):
    # 读取文件内容
    with open(file_path, 'r') as file:
        content = file.read()
    
    # 按逗号分割并去除每个单词前后的空格
    words = [word.strip() for word in content.split(',')]
    print
    
    # 创建一个集合来存储唯一的单词
    unique_words = set()
    
    # 处理每个单词
    for word in words:
        # 跳过包含连字符'-'的单词
        if '-' in word:
            continue
        
        # 跳过全部是大写的单词
        if word.isupper():
            continue
        
        # 添加到集合中（自动去重）
        unique_words.add(word)
    
    # 打印处理后的单词
    for word in sorted(unique_words):
        print(word)
    
    # 返回处理后的单词数量
    return len(unique_words)

if __name__ == "__main__":
    file_path = "/Users/admin/Desktop/work2025/python/vichat_code_auto_tool/words.txt"
    count = process_words(file_path)